package com.aipodcast.webbackend.config.model;


import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author RedStar
 * @date 2025/9/22 22:06
 * @description 统一返回格式
 */
@Data
@NoArgsConstructor
public class ApiResponse<T> {

    private int code;         // 状态码
    private String message;   // 消息
    private T data;           // 数据
    private long timestamp;   // 返回时间戳

    // 构造方法
    public ApiResponse(int code, String message, T data) {
        this.code = code;
        this.message = message;
        this.data = data;
        this.timestamp = System.currentTimeMillis();
    }

}
